<%-- 
    Document   : editUser
    Created on : Sep 8, 2011, 10:56:23 AM
    Author     : HIEP
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>

<!DOCTYPE html>
<div id="content" class="roundedBorders">
    <!-- Title -->
    <div id="title" class="b2">
        <h2>Edit User</h2>
    </div>
    <!-- Title -->
    <!-- Inner Content -->
    <div id="innerContent">
        <logic:notEmpty name="item">
            <!-- Form -->
            <html:form action="/UserAction.do?method=updateRole" method="POST">
                <div class="fieldset fieldsetBlock active tabs">
                    <div class="header">
                        <h3>Edit Role Of User</h3>
                    </div>
                    <div class="tabs">
                        <fieldset id="fieldset1" >
                            <legend>Post content</legend>
                            <html:hidden name="item" property="id"/>
                            <div class="field required">
                                <label>Full name</label> 
                                <html:text styleClass="text" property="fullname" name="item" readonly="true"/>
                                <span class="required-icon tooltip" title=" This field is required, it cannot be blank.">Required</span> 
                            </div>
                            <div class="field required">
                                <label>Address</label> 
                                <html:text styleClass="text" property="address" name="item" readonly="true"/>
                                <span class="required-icon tooltip" title=" This field is required, it cannot be blank.">Required</span> 
                            </div>
                            <div class="field required">
                                <label>Phone</label> 
                                <html:text styleClass="text" property="phone" name="item" readonly="true"/>
                                <span class="required-icon tooltip" title=" This field is required, it cannot be blank.">Required</span> 
                            </div>
                            <div class="field required">
                                <label>Nationality</label> 
                                <html:text styleClass="text" property="nationality" name="item" readonly="true"/>
                                <span class="required-icon tooltip" title=" This field is required, it cannot be blank.">Required</span> 
                            </div>
                            <div class="field required">
                                <label>Email</label> 
                                <html:text styleClass="text" property="email" name="item" readonly="true"/>
                                <span class="required-icon tooltip" title=" This field is required, it cannot be blank.">Required</span> 
                            </div>
                            <div class="field required">
                                <label>Is Administrator</label>
                                <select name="roleId" style="width: 200px;">
                                    <c:if test="${item.role == 1}">
                                        <option selected="selected" value="1">Administrator</option>
                                    </c:if>
                                    <c:if test="${item.role == 0}">
                                        <option selected="selected" value="1">User</option>
                                    </c:if>
                                    <option value="0">User</option>
                                    <option value="1">Administrator</option>
                                </select>
                            </div>
                            <div id="buttom1">
                                <strong>
                                    <html:submit value="Update" styleClass="buttom_form"/>
                                </strong>
                            </div>
                        </fieldset>
                    </div>
                    <span class="bBR"></span>
                </div>
            </html:form>
            <!-- /Form -->
        </logic:notEmpty>
    </div>
    <!-- /Inner Content -->
    <div class="bBottom"><div></div></div>
</div>
